//
//  WPPEFSecondTableViewCell.m
//  wobingwoyi
//
//  Created by WGP on 2017/3/2.
//  Copyright © 2017年 WGP. All rights reserved.
//

#import "WPPEFSecondTableViewCell.h"

@interface WPPEFSecondTableViewCell ()

@property(nonatomic,strong)UIView *bgView;

@end

@implementation WPPEFSecondTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        self.contentView.backgroundColor = GlobalBgColor;
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.bgView = [UIView new];
        self.bgView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.bgView];
        [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.bottom.equalTo(self.contentView);
            make.top.equalTo(self.contentView).offset(10);
        }];
        UILabel *label = [UILabel new];
        label.text = @"体检档案时间:";
        label.font = [UIFont systemFontOfSize:14];
        label.textColor = GLobalFontColor;
        [self.bgView addSubview:label];
        [label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.bgView);
            make.left.equalTo(self.contentView).offset(10);
        }];
        
        self.timeLabel = [UILabel new];
//        [self.timeBtn setTitle:@"请选择时间" forState:UIControlStateNormal];
//        [self.timeBtn setTitleColor:GloballightFontColor forState:UIControlStateNormal];
//        self.timeBtn.titleLabel.font = [UIFont systemFontOfSize:14];
//        [self.timeBtn addTarget:self action:@selector(timeBtnDidClick) forControlEvents:UIControlEventTouchDown];
        self.timeLabel.font = [UIFont systemFontOfSize:14];
        self.timeLabel.textColor = GloballightFontColor;
        self.timeLabel.text = @"请选择时间";
        [self.bgView addSubview:self.timeLabel];
        [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.bgView);
            make.left.equalTo(label.mas_right).offset(10);
        }];
        
        UIImageView *line1 = [UIImageView lineImageView];
         UIImageView *line2 = [UIImageView lineImageView];
        [self.bgView addSubview:line1];
        [self.bgView addSubview:line2];
        line1.frame = CGRectMake(0, 0, SCREEN_WIDTH, 0.5);
        [line2 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.bottom.equalTo(self.bgView);
            make.height.mas_equalTo(0.5);
        }];
    }
    return self;
}

-(void)timeBtnDidClick
{
    if(self.timeChooseBlock)
    {
        self.timeChooseBlock();
    }
}

@end
